﻿using System;
using System.Collections.Generic;
using System.Text;
using StackExchange.Redis;

namespace Vabp.Infrastructure.Redis
{
    public class RedisHelper
    {
        private static ConnectionMultiplexer redis = ConnectionMultiplexer.Connect("localhost,allowAdmin=true");


        public static IDatabase GetDatabase(int index = 0)
        {
            return redis.GetDatabase(index);
        }

        public static IServer GetServer()
        {
            return  redis.GetServer(RedisConsts.Host, RedisConsts.Port);
        }
    }
}
